package com.pesking.core.sqlparser.processor;

import java.util.Arrays;
import java.util.List;
import java.util.UUID;

import com.pesking.core.parameter.Parameter;
import com.pesking.core.sqlparser.parameter.SqlParameter;
import com.pesking.core.sqlparser.parameter.SqlParameterProcessor;

public class UUID36SqlParameterHandler extends SqlParameterProcessor {

	@Override
	public List<String> getSqlParameterType() {
		return Arrays.asList(new String []{"UUID36"});
	}
	@Override
	public void handle(StringBuilder sbSQL, Parameter parameter, List<SqlParameter> processors,SqlParameter sqlParameter) {
		UUID o = UUID.randomUUID();
		String uuid = o.toString();
		sbSQL.append("'" + uuid + "'");
	}

}
